package com.xg.service;


import com.xg.common.request.SeriesReq;
import com.xg.common.response.UsedCarBrand;
import com.xg.common.response.UsedCarSeries;
import com.xg.common.result.ApiResult;
import com.xg.common.util.PageUtil;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "service-car-provider")
public interface SeriesService {

    @GetMapping("/series/list")
    ApiResult<List<UsedCarSeries>> findUsedCarSeriesList();

    @RequestMapping("/series/queryPageList")
    ApiResult<PageUtil<UsedCarSeries>> queryPageList(@RequestBody SeriesReq seriesReq);

    @RequestMapping("/series/delete")
    ApiResult deleteSerices(@RequestParam("ids") List<Integer> ids);

    @RequestMapping("/series/info")
    ApiResult<UsedCarSeries> selectSeriesInfo(@RequestParam("id") Integer seriesId);

    @RequestMapping("/series/save")
    ApiResult saveSeries(@RequestBody UsedCarSeries usedCarSeries);

    @GetMapping("/series/findListByBrandId")
    ApiResult<List<UsedCarSeries>> findListByBrandId(@RequestParam("brandId") Integer brandId);

    @GetMapping("/series/findBrandBySeriesId")
    ApiResult<UsedCarBrand> findBrandBySeriesId(@RequestParam("seriesId") Integer seriesId);
}
